package com.aikon.wht.ref;


import javax.naming.Reference;

/**
 * @author haitao.wang http://www.bestwonderful.com
 */
public class TestOfReference {

    public static void main(String[] args) throws Exception {
        RefMobel refMobel = new RefMobel();
        refMobel.setProp("TestRef");

        Reference ref = new Reference(RefMobel.class.getName());

        DefaultObjectFactory defaultObjectFactory = new DefaultObjectFactory();

        RefMobel mod = (RefMobel) defaultObjectFactory.getObjectInstance(ref, null, null, null);
        System.out.println(mod.getProp());

    }
}
